import request from '@/utils/request'

// 查询回款列表
export function listCrmReceivables(query) {
  return request({
    url: '/crm/crmReceivables/list',
    method: 'get',
    params: query
  })
}

export function auditList(query) {
  return request({
    url: '/crm/crmReceivables/auditList',
    method: 'get',
    params: query
  })
}

// 查询回款详细
export function getCrmReceivables(receivablesId) {
  return request({
    url: '/crm/crmReceivables/' + receivablesId,
    method: 'get'
  })
}

// 新增回款
export function addCrmReceivables(data) {
  return request({
    url: '/crm/crmReceivables',
    method: 'post',
    data: data
  })
}

// 修改回款
export function updateCrmReceivables(data) {
  return request({
    url: '/crm/crmReceivables',
    method: 'put',
    data: data
  })
}

// 删除回款
export function delCrmReceivables(receivablesId) {
  return request({
    url: '/crm/crmReceivables/' + receivablesId,
    method: 'delete'
  })
}

// 导出回款
export function exportCrmReceivables(query) {
  return request({
    url: '/crm/crmReceivables/export',
    method: 'get',
    params: query
  })
}
export function audit(data) {
  return request({
    url: '/crm/crmReceivables/audit',
    method: 'post',
    data: data
  })
}
